package com.ylbh.modules.balancelog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ylbh.common.exception.NormalException;
import com.ylbh.common.pojo.balancelog.dto.UserBalanceMoneyDTO;
import com.ylbh.common.pojo.member.dto.select.RevenueLogSelectDTO;
import com.ylbh.common.utils.PageUtils;
import com.ylbh.modules.balancelog.entity.ShoppingBalanceLog;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;

/**
 * 用户余额变动表 主要记录用户的余额变动信息
 *
 * @author czx
 * @date 2019-09-03 14:25:10
 */
public interface ShoppingBalanceLogService extends IService<ShoppingBalanceLog> {

    /**
     * 余额变动
     * @param pageDTO
     * @return
     */
    PageUtils queryBalanceLogList(RevenueLogSelectDTO pageDTO);

    /**
     * 修改用户的佣金
     * @param userBalanceMoneyDTO
     * @return
     */
    String modifyUserCommissionMoney(UserBalanceMoneyDTO userBalanceMoneyDTO);

    /**
     * 查询用户当前的佣金
     * @param name
     * @return
     */
    BigDecimal getCommissionMoneyByUserName(String name);

    /**
     * 系统管理余额记录
     * @param dto
     * @return
     */
    PageUtils queryAdminAndBalanceLog(RevenueLogSelectDTO dto);

    /**
     * 余额变动导出
     * @param request
     * @param response
     */
    void balanceRecordExcel(HttpServletRequest request, HttpServletResponse response) throws NormalException;
}

